package com.dc.factory;


import com.dc.service.DeviceService;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

public class DeviceFactory {

    private static final Map<String, DeviceService> strategyMap = new ConcurrentHashMap<>();


    public static DeviceService getStrategy(String serviceId) {
        return strategyMap.get(serviceId);
    }

    public static void register(String serviceIdType, DeviceService payService) {
        strategyMap.put(serviceIdType, payService);
    }
}
